package com.shixi.shixitraining.shixitraining.ui.tabhome.adapter;

import android.content.Context;

import com.bumptech.glide.RequestManager;
import com.shixi.shixitraining.shixitraining.R;
import com.shixi.shixitraining.shixitraining.ui.tabhome.entity.HomeBean;
import com.shixi.shixitraining.shixitraining.view.recycleview.BaseAdapter;
import com.shixi.shixitraining.shixitraining.view.recycleview.BaseRecycleHolder;

import java.util.List;

/**
 * Created by shenyan on 2018/7/9.
 */

public class HomeListAdapter extends BaseAdapter<HomeBean.DataBean.JobsBean> {

private RequestManager manager;
    public HomeListAdapter(Context context,List<HomeBean.DataBean.JobsBean> data, RequestManager manager) {
        super(context,data);
        this.manager=manager;
    }

    @Override
    public void convert(BaseRecycleHolder holder, HomeBean.DataBean.JobsBean item, int position) {
//        holder.setText(R.id.tv_list_title, item.getTitle());
//        holder.setText(R.id.tv_list_dir,item.getDesc());
//        holder.setText(R.id.tv_list_address,item.getPalace());
//        holder.setText(R.id.tv_list_education,item.getEducation());
//        ImageView imageView = holder.getView(R.id.iv_training_right);
//        ImageLoaderUtil.displayImage(ImageLoaderUtil.PLAYHOLER_IMAGE_TYPE.MIDDLE_SQUARE,manager,item.getImgUrl(),imageView);
        holder.setText(R.id.tv_list_title, item.getName());
        holder.setText(R.id.tv_list_dir,item.getTrade());
        holder.setText(R.id.tv_list_address,item.getAddress());
        holder.setText(R.id.tv_list_education,item.getNature());

    }

    @Override
    protected int getLayoutId(int viewType) {
        return R.layout.adapter_home_list;
    }
}
